<template>
  <el-dialog 
    width="1200px"
    append-to-body 
    top="10vh"
    :close-on-click-modal="false"
    :visible.sync="show" 
    title="查看详情"
  >
    <el-tabs>
      <el-tab-pane label="使用明细">
        <useDetail v-if="show" :id="id"></useDetail>
      </el-tab-pane>
      <el-tab-pane label="批次详情">
        <batchDetail v-if="show" :id="id"></batchDetail>
      </el-tab-pane>
    </el-tabs>
  </el-dialog>
</template>

<script>
import batchDetail from './batchDetail';
import useDetail from './useDetail';

export default {
  name: "drugDetail",
  components: { batchDetail, useDetail },
  props: {
    id: {
      type: Number,
      default: null
    }
  },
  data() {
    return {
      show: false,
    };
  }
}
</script>